import $http from '../common/request/requestConfig';

export const api = {
	getArticle:'we/getArticle',
	addComment:'we/addComment',
	addFavorite:'we/addFavorite',
	cancelFavorite:'we/cancelFavorite',
	paginateComment:'we/paginateComment',
	addCommentFavorite:'we/addCommentFavorite',
	cancelCommentFavorite:'we/cancelCommentFavorite',
	addOrder:'we/addOrder',
	wxPay:'we/wxPay',
	deleteCommentComment: 'we/deleteCommentComment',
	deleteComment: 'we/deleteComment',
	addCommentComment: 'we/addCommentComment',
	paginateMyComment: 'we/paginateMyComment'
	
}

export function addFavorite(parameter) {
    return $http.post(api.addFavorite, parameter)
}

export function cancelFavorite(parameter) {
    return $http.post(api.cancelFavorite, parameter)
}
export function addComment(parameter) {
    return $http.post(api.addComment, parameter)
}

export function getArticle(parameter) {
    return $http.get(api.getArticle, parameter)
}


export function paginateComment(parameter) {
    return $http.get(api.paginateComment, parameter)
}

export function addCommentFavorite(parameter) {
    return $http.post(api.addCommentFavorite, parameter)
}

export function cancelCommentFavorite(parameter) {
    return $http.post(api.cancelCommentFavorite, parameter)
}

export function addOrder(parameter) {
    return $http.post(api.addOrder, parameter)
}

export function wxPay(parameter) {
    return $http.get(api.wxPay, parameter)
}

export function deleteComment(parameter) {
    return $http.post(api.deleteComment, parameter)
}

export function deleteCommentComment(parameter) {
    return $http.post(api.deleteCommentComment, parameter)
}

export function addCommentComment(parameter) {
    return $http.post(api.addCommentComment, parameter)
}

export function paginateMyComment(parameter) {
    return $http.post(api.paginateMyComment, parameter)
}
